package com.autonavi.yunda.yunji.core.vo.node;

import com.autonavi.yunda.yunji.common.exception.AmapPreconditions;
import com.autonavi.yunda.yunji.core.enums.SqlDebugType;
import com.autonavi.yunda.yunji.core.enums.SqlResultType;
import com.fasterxml.jackson.annotation.JsonInclude;

/**
 * @author cizhong.wcs
 * @date 2022/5/18 17:04
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class SqlNode extends BaseNode {
    public String dbName;
    public String sql;
    public SqlDebugType debug = SqlDebugType.EXEC;
    public boolean camel;
    public SqlResultType sqlResultType = SqlResultType.LIST;

    @Override
    public void customParamCheck() {
        AmapPreconditions.checkNotNull(dbName);
        AmapPreconditions.checkNotNull(sql);
    }
}
